from selenium import webdriver
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
import time

d = webdriver.Chrome()
d.get('http://192.168.0.125:9009/wp-login.php')
d.maximize_window()
time.sleep(1)

input_ele = d.find_element(By.CSS_SELECTOR,'[id="user_login"]')
time.sleep(1)

# 使用键盘操作 导入Keys模块
input_ele.send_keys('hhhh')
time.sleep(1)
input_ele.send_keys(Keys.BACKSPACE)  # 删除
time.sleep(1)
input_ele.send_keys(Keys.ENTER)  # 回车
time.sleep(1)


d.quit()
